package edu.sdibt;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class ByteStreamTest {

	public static void main(String[] args) {
		try (InputStream input=new FileInputStream("E:\\zxr\\1.txt");
				OutputStream output=new FileOutputStream("E:\\zxr1\\2.txt"); ){
			byte[] buffer = new byte[128];
			while(input.read(buffer)!=-1) {
				output.write(buffer);
			}
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		
	}

}
